package com.lyh.common.enums;

/**
 * 充值类型
 *
 * @author lyh
 */
public enum RechargeTypeEnum
{
    CASH("CASH", "现金"),
    ASSET_EVIDENCE("ASSET_EVIDENCE", "资产通证"),
    CONSUMER_COUPON("CONSUMER_COUPON", "消费卷"),
    ;

    private  String code;
    private  String info;

    RechargeTypeEnum(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static RechargeTypeEnum getEnum(String code) {
        for (RechargeTypeEnum el : RechargeTypeEnum.values()) {
            if (el.getCode().equals(code)) {
                return el;
            }
        }

        return null;
    }

}
